home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.1B1 / AIncludes / Lists.a < prev    next >
Encoding:
Text File  |  1995-04-18  |  8.2 KB  |  444 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Lists.a
  3. ;
  4. ;    Contains:    List Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__LISTS__') = 'UNDEFINED' THEN
  21. __LISTS__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__CONTROLS__') = 'UNDEFINED' THEN
  30.     include 'Controls.a'
  31.     ENDIF
  32. ;        include 'Quickdraw.a'                                        ;
  33. ;            include 'MixedMode.a'                                    ;
  34. ;            include 'QuickdrawText.a'                                ;
  35. ;        include 'Menus.a'                                            ;
  36. ;            include 'Memory.a'                                        ;
  37.  
  38.     IF &TYPE('__MEMORY__') = 'UNDEFINED' THEN
  39.     include 'Memory.a'
  40.     ENDIF
  41.     IF &TYPE('STRICT_LISTS') = 'UNDEFINED' THEN
  42.     STRICT_LISTS: SET 0
  43.     ENDIF
  44.     IF ¬ STRICT_LISTS  THEN
  45.  
  46. lDoVAutoscroll                    EQU        2
  47. lDoHAutoscroll                    EQU        1
  48. lOnlyOne                        EQU        -128
  49. lExtendDrag                        EQU        64
  50. lNoDisjoint                        EQU        32
  51. lNoExtend                        EQU        16
  52. lNoRect                            EQU        8
  53. lUseSense                        EQU        4
  54. lNoNilHilite                    EQU        2
  55.  
  56.     ENDIF
  57.  
  58. lInitMsg                        EQU        0
  59. lDrawMsg                        EQU        1
  60. lHiliteMsg                        EQU        2
  61. lCloseMsg                        EQU        3
  62.  
  63.     IF STRICT_LISTS  THEN
  64. ; typedef ListRef             ListHandle
  65.     ELSE
  66. ; typedef struct ListRec     ListRec, *ListPtr, **ListHandle
  67. ; typedef ListHandle         ListRef
  68.     ENDIF
  69. ; typedef Point             Cell
  70. ; typedef Rect                 ListBounds
  71. ; typedef char                 DataArray[32001]
  72.     IF ¬ STRICT_LISTS  THEN
  73. ListRec                 RECORD    0
  74. rView                     ds     Rect    ; offset: $0 (0)
  75. port                     ds.l   1        ; offset: $8 (8)
  76. indent                     ds     Point    ; offset: $C (12)
  77. cellSize                 ds     Point    ; offset: $10 (16)
  78. visible                     ds.l   2        ; offset: $14 (20)
  79. vScroll                     ds.l   1        ; offset: $1C (28)
  80. hScroll                     ds.l   1        ; offset: $20 (32)
  81. selFlags                 ds.b   1        ; offset: $24 (36)
  82. lActive                     ds.b   1        ; offset: $25 (37)
  83. lReserved                 ds.b   1        ; offset: $26 (38)
  84. listFlags                 ds.b   1        ; offset: $27 (39)
  85. clikTime                 ds.l   1        ; offset: $28 (40)
  86. clikLoc                     ds     Point    ; offset: $2C (44)
  87. mouseLoc                 ds     Point    ; offset: $30 (48)
  88. lClickLoop                 ds.l   1        ; offset: $34 (52)
  89. lastClick                 ds.l   1        ; offset: $38 (56)
  90. refCon                     ds.l   1        ; offset: $3C (60)
  91. listDefProc                 ds.l   1        ; offset: $40 (64)
  92. userHandle                 ds.l   1        ; offset: $44 (68)
  93. dataBounds                 ds.l   2        ; offset: $48 (72)
  94. cells                     ds.l   1        ; offset: $50 (80)
  95. maxIndex                 ds.w   1        ; offset: $54 (84)
  96. cellArray                 ds.w   1        ; offset: $56 (86)
  97. sizeof                     EQU *            ; size:   $58 (88)
  98.                         ENDR
  99.  
  100.     ENDIF
  101. ;
  102. ; pascal ListRef LNew(const Rect *rView, const ListBounds *dataBounds, Point cSize, short theProc, WindowRef theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert)
  103. ;
  104.     IF ¬ GENERATINGCFM THEN
  105.         Macro
  106.         _LNew
  107.             move.w    #$0044,-(sp)
  108.             dc.w     $A9E7
  109.         EndM
  110.     ELSE
  111.         IMPORT_CFM_FUNCTION    LNew
  112.     ENDIF
  113.  
  114. ;
  115. ; pascal void LDispose(ListRef lHandle)
  116. ;
  117.     IF ¬ GENERATINGCFM THEN
  118.         Macro
  119.         _LDispose
  120.             move.w    #$0028,-(sp)
  121.             dc.w     $A9E7
  122.         EndM
  123.     ELSE
  124.         IMPORT_CFM_FUNCTION    LDispose
  125.     ENDIF
  126.  
  127. ;
  128. ; pascal short LAddColumn(short count, short colNum, ListRef lHandle)
  129. ;
  130.     IF ¬ GENERATINGCFM THEN
  131.         Macro
  132.         _LAddColumn
  133.             move.w    #$0004,-(sp)
  134.             dc.w     $A9E7
  135.         EndM
  136.     ELSE
  137.         IMPORT_CFM_FUNCTION    LAddColumn
  138.     ENDIF
  139.  
  140. ;
  141. ; pascal short LAddRow(short count, short rowNum, ListRef lHandle)
  142. ;
  143.     IF ¬ GENERATINGCFM THEN
  144.         Macro
  145.         _LAddRow
  146.             move.w    #$0008,-(sp)
  147.             dc.w     $A9E7
  148.         EndM
  149.     ELSE
  150.         IMPORT_CFM_FUNCTION    LAddRow
  151.     ENDIF
  152.  
  153. ;
  154. ; pascal void LDelColumn(short count, short colNum, ListRef lHandle)
  155. ;
  156.     IF ¬ GENERATINGCFM THEN
  157.         Macro
  158.         _LDelColumn
  159.             move.w    #$0020,-(sp)
  160.             dc.w     $A9E7
  161.         EndM
  162.     ELSE
  163.         IMPORT_CFM_FUNCTION    LDelColumn
  164.     ENDIF
  165.  
  166. ;
  167. ; pascal void LDelRow(short count, short rowNum, ListRef lHandle)
  168. ;
  169.     IF ¬ GENERATINGCFM THEN
  170.         Macro
  171.         _LDelRow
  172.             move.w    #$0024,-(sp)
  173.             dc.w     $A9E7
  174.         EndM
  175.     ELSE
  176.         IMPORT_CFM_FUNCTION    LDelRow
  177.     ENDIF
  178.  
  179. ;
  180. ; pascal Boolean LGetSelect(Boolean next, Cell *theCell, ListRef lHandle)
  181. ;
  182.     IF ¬ GENERATINGCFM THEN
  183.         Macro
  184.         _LGetSelect
  185.             move.w    #$003C,-(sp)
  186.             dc.w     $A9E7
  187.         EndM
  188.     ELSE
  189.         IMPORT_CFM_FUNCTION    LGetSelect
  190.     ENDIF
  191.  
  192. ;
  193. ; pascal Cell LLastClick(ListRef lHandle)
  194. ;
  195.     IF ¬ GENERATINGCFM THEN
  196.         Macro
  197.         _LLastClick
  198.             move.w    #$0040,-(sp)
  199.             dc.w     $A9E7
  200.         EndM
  201.     ELSE
  202.         IMPORT_CFM_FUNCTION    LLastClick
  203.     ENDIF
  204.  
  205. ;
  206. ; pascal Boolean LNextCell(Boolean hNext, Boolean vNext, Cell *theCell, ListRef lHandle)
  207. ;
  208.     IF ¬ GENERATINGCFM THEN
  209.         Macro
  210.         _LNextCell
  211.             move.w    #$0048,-(sp)
  212.             dc.w     $A9E7
  213.         EndM
  214.     ELSE
  215.         IMPORT_CFM_FUNCTION    LNextCell
  216.     ENDIF
  217.  
  218. ;
  219. ; pascal Boolean LSearch(const void *dataPtr, short dataLen, ListSearchUPP searchProc, Cell *theCell, ListRef lHandle)
  220. ;
  221.     IF ¬ GENERATINGCFM THEN
  222.         Macro
  223.         _LSearch
  224.             move.w    #$0054,-(sp)
  225.             dc.w     $A9E7
  226.         EndM
  227.     ELSE
  228.         IMPORT_CFM_FUNCTION    LSearch
  229.     ENDIF
  230.  
  231. ;
  232. ; pascal void LSize(short listWidth, short listHeight, ListRef lHandle)
  233. ;
  234.     IF ¬ GENERATINGCFM THEN
  235.         Macro
  236.         _LSize
  237.             move.w    #$0060,-(sp)
  238.             dc.w     $A9E7
  239.         EndM
  240.     ELSE
  241.         IMPORT_CFM_FUNCTION    LSize
  242.     ENDIF
  243.  
  244. ;
  245. ; pascal void LSetDrawingMode(Boolean drawIt, ListRef lHandle)
  246. ;
  247.     IF ¬ GENERATINGCFM THEN
  248.         Macro
  249.         _LSetDrawingMode
  250.             move.w    #$002C,-(sp)
  251.             dc.w     $A9E7
  252.         EndM
  253.     ELSE
  254.         IMPORT_CFM_FUNCTION    LSetDrawingMode
  255.     ENDIF
  256.  
  257. ;
  258. ; pascal void LScroll(short dCols, short dRows, ListRef lHandle)
  259. ;
  260.     IF ¬ GENERATINGCFM THEN
  261.         Macro
  262.         _LScroll
  263.             move.w    #$0050,-(sp)
  264.             dc.w     $A9E7
  265.         EndM
  266.     ELSE
  267.         IMPORT_CFM_FUNCTION    LScroll
  268.     ENDIF
  269.  
  270. ;
  271. ; pascal void LAutoScroll(ListRef lHandle)
  272. ;
  273.     IF ¬ GENERATINGCFM THEN
  274.         Macro
  275.         _LAutoScroll
  276.             move.w    #$0010,-(sp)
  277.             dc.w     $A9E7
  278.         EndM
  279.     ELSE
  280.         IMPORT_CFM_FUNCTION    LAutoScroll
  281.     ENDIF
  282.  
  283. ;
  284. ; pascal void LUpdate(RgnHandle theRgn, ListRef lHandle)
  285. ;
  286.     IF ¬ GENERATINGCFM THEN
  287.         Macro
  288.         _LUpdate
  289.             move.w    #$0064,-(sp)
  290.             dc.w     $A9E7
  291.         EndM
  292.     ELSE
  293.         IMPORT_CFM_FUNCTION    LUpdate
  294.     ENDIF
  295.  
  296. ;
  297. ; pascal void LActivate(Boolean act, ListRef lHandle)
  298. ;
  299.     IF ¬ GENERATINGCFM THEN
  300.         Macro
  301.         _LActivate
  302.             dc.w     $4267
  303.             dc.w     $A9E7
  304.         EndM
  305.     ELSE
  306.         IMPORT_CFM_FUNCTION    LActivate
  307.     ENDIF
  308.  
  309. ;
  310. ; pascal void LCellSize(Point cSize, ListRef lHandle)
  311. ;
  312.     IF ¬ GENERATINGCFM THEN
  313.         Macro
  314.         _LCellSize
  315.             move.w    #$0014,-(sp)
  316.             dc.w     $A9E7
  317.         EndM
  318.     ELSE
  319.         IMPORT_CFM_FUNCTION    LCellSize
  320.     ENDIF
  321.  
  322. ;
  323. ; pascal Boolean LClick(Point pt, short modifiers, ListRef lHandle)
  324. ;
  325.     IF ¬ GENERATINGCFM THEN
  326.         Macro
  327.         _LClick
  328.             move.w    #$0018,-(sp)
  329.             dc.w     $A9E7
  330.         EndM
  331.     ELSE
  332.         IMPORT_CFM_FUNCTION    LClick
  333.     ENDIF
  334.  
  335. ;
  336. ; pascal void LAddToCell(const void *dataPtr, short dataLen, Cell theCell, ListRef lHandle)
  337. ;
  338.     IF ¬ GENERATINGCFM THEN
  339.         Macro
  340.         _LAddToCell
  341.             move.w    #$000C,-(sp)
  342.             dc.w     $A9E7
  343.         EndM
  344.     ELSE
  345.         IMPORT_CFM_FUNCTION    LAddToCell
  346.     ENDIF
  347.  
  348. ;
  349. ; pascal void LClrCell(Cell theCell, ListRef lHandle)
  350. ;
  351.     IF ¬ GENERATINGCFM THEN
  352.         Macro
  353.         _LClrCell
  354.             move.w    #$001C,-(sp)
  355.             dc.w     $A9E7
  356.         EndM
  357.     ELSE
  358.         IMPORT_CFM_FUNCTION    LClrCell
  359.     ENDIF
  360.  
  361. ;
  362. ; pascal void LGetCell(void *dataPtr, short *dataLen, Cell theCell, ListRef lHandle)
  363. ;
  364.     IF ¬ GENERATINGCFM THEN
  365.         Macro
  366.         _LGetCell
  367.             move.w    #$0038,-(sp)
  368.             dc.w     $A9E7
  369.         EndM
  370.     ELSE
  371.         IMPORT_CFM_FUNCTION    LGetCell
  372.     ENDIF
  373.  
  374. ;
  375. ; pascal void LRect(Rect *cellRect, Cell theCell, ListRef lHandle)
  376. ;
  377.     IF ¬ GENERATINGCFM THEN
  378.         Macro
  379.         _LRect
  380.             move.w    #$004C,-(sp)
  381.             dc.w     $A9E7
  382.         EndM
  383.     ELSE
  384.         IMPORT_CFM_FUNCTION    LRect
  385.     ENDIF
  386.  
  387. ;
  388. ; pascal void LSetCell(const void *dataPtr, short dataLen, Cell theCell, ListRef lHandle)
  389. ;
  390.     IF ¬ GENERATINGCFM THEN
  391.         Macro
  392.         _LSetCell
  393.             move.w    #$0058,-(sp)
  394.             dc.w     $A9E7
  395.         EndM
  396.     ELSE
  397.         IMPORT_CFM_FUNCTION    LSetCell
  398.     ENDIF
  399.  
  400. ;
  401. ; pascal void LSetSelect(Boolean setIt, Cell theCell, ListRef lHandle)
  402. ;
  403.     IF ¬ GENERATINGCFM THEN
  404.         Macro
  405.         _LSetSelect
  406.             move.w    #$005C,-(sp)
  407.             dc.w     $A9E7
  408.         EndM
  409.     ELSE
  410.         IMPORT_CFM_FUNCTION    LSetSelect
  411.     ENDIF
  412.  
  413. ;
  414. ; pascal void LDraw(Cell theCell, ListRef lHandle)
  415. ;
  416.     IF ¬ GENERATINGCFM THEN
  417.         Macro
  418.         _LDraw
  419.             move.w    #$0030,-(sp)
  420.             dc.w     $A9E7
  421.         EndM
  422.     ELSE
  423.         IMPORT_CFM_FUNCTION    LDraw
  424.     ENDIF
  425.  
  426.     IF ¬ STRICT_LISTS  THEN
  427. ;
  428. ; pascal void LGetCellDataLocation(short *offset, short *len, Cell theCell, ListRef lHandle)
  429. ;
  430.     IF ¬ GENERATINGCFM THEN
  431.         Macro
  432.         _LGetCellDataLocation
  433.             move.w    #$0034,-(sp)
  434.             dc.w     $A9E7
  435.         EndM
  436.     ELSE
  437.         IMPORT_CFM_FUNCTION    LGetCellDataLocation
  438.     ENDIF
  439.  
  440.     ENDIF
  441.     IF OLDROUTINENAMES  THEN
  442.     ENDIF
  443.     ENDIF ; __LISTS__
  444.